package com.ruoyi.file.service.impl;

import com.ruoyi.file.bean.FileUploadResult;
import com.ruoyi.file.service.ISysFileService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;

/**
 * @author william.zhao
 * @version 1.0
 * @date 2023/12/10/ 18:55
 * @since jdk-17.0.2
 */
public abstract class AbstractFileService implements ISysFileService {


    @Override
    public FileUploadResult uploadFileWithFileCode(String fileCode, MultipartFile file) throws Exception {
        return null;
    }

    @Override
    public FileUploadResult uploadFileWithFileFolder(String folder, MultipartFile file) throws Exception {
        return null;
    }

    /**
     * upload file by path.
     *
     * @param filePath
     * @param file
     * @return
     * @throws Exception
     */
    @Override
    public FileUploadResult uploadFileByPath(String filePath, MultipartFile file) throws Exception {
        return null;
    }


    @Override
    public void preview(String fileName, HttpServletResponse response) {

    }


    /**
     * get content by url.
     *
     * @param url       the file url.
     * @param extension the file extension.
     * @return the fine content.
     */
    @Override
    public String getContentByURL(String url, String extension) {
        return null;
    }

    /**
     * get file list under special path.
     *
     * @param path the file path in server
     * @return the file path list under a special path.
     */
    @Override
    public List<String> getFileListUnberPath(String path) {
        return null;
    }

    /**
     * get file inputstream by file path in server.
     *
     * @param filePath the file path in server.
     * @return the inputstream.
     */
    @Override
    public InputStream getInputStreamByPath(String filePath) {
        return null;
    }
}
